using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using THSERP.BusinessEntities;
using THSERP.BaseProvider;
namespace THSERP.Modules.Handover
{
    public class BRHandoverIncompletesGridControl : THSGridControl 
    {
        private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
    
        public override void InitGridControlDataSource()
        {
            //base.InitGridControlDataSource();
            HandoverEntities entity = (HandoverEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity;
            BindingSource bds = new BindingSource();
            bds.DataSource = entity.BRHandoverIncompletesList;
            this.DataSource = bds;
        }

        protected override DevExpress.XtraGrid.Views.Grid.GridView InitializeGridView()
        {
            //Check edit item privilege for gridview_Hieu.nguyen_29/04/2010
            DevExpress.XtraGrid.Views.Grid.GridView gridView = base.InitializeGridView();
            DevExpress.XtraGrid.Columns.GridColumn colTotalCost = gridView.Columns["BRHandoverIncompleteTotalAmount"];
            colTotalCost.SummaryItem.FieldName = "BRHandoverIncompleteTotalAmount";
            colTotalCost.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            colTotalCost.SummaryItem.DisplayFormat = "{0:n2}";
            gridView.OptionsView.ShowFooter=true;
            return gridView;
        }


    }
}
